-
Notifications
You must be signed in to change notification settings - Fork 5
Issue #101: run bestPractices recipe with build #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| - org.openrewrite.java.recipes.RecipeEqualsAndHashCodeCallSuper | ||
| - org.openrewrite.java.recipes.UseTreeRandomId | ||
| - org.openrewrite.java.recipes.migrate.RemoveTraitsUsageRecipes | ||
| - org.openrewrite.staticanalysis.NeedBraces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - org.openrewrite.staticanalysis.NeedBraces | |
| - org.openrewrite.java.InlineMethodCalls | |
| - org.openrewrite.staticanalysis.NeedBraces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This recipe replaces the older RemoveTraitsUsageRecipes, as indicated hre:
| # - org.openrewrite.java.recipes.ExecutionContextParameterName | ||
| - org.openrewrite.java.recipes.IsLiteralNullRecipe | ||
| - org.openrewrite.java.recipes.MissingOptionExample | ||
| - org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes | |
| - org.openrewrite.java.recipes.ExecutionContextParameterName: | |
| parameterName: executionContext | |
| - org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was commented out above, but was recently extended to take a configurable variable name in response to the feedback received here:
openrewrite/rewrite-rewrite@c52c549
|
@rdiachenko done. kindly review. |
How fast to execute all recipes from rewrite.yml on localhost? Keeping them in ci instead of the build makes sense if local build takes lots of time (say, minutes). If not, then makes sense to me to remove from ci, since all recipes are run during verify phase and we fail ci when there is non-empty diff from running |
|
|
@rdiachenko done. |
| @Override | ||
| public J.CompilationUnit visitCompilationUnit(J.CompilationUnit cu, ExecutionContext ctx) { | ||
| public J.CompilationUnit visitCompilationUnit(J.CompilationUnit cu, | ||
| ExecutionContext executionContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see the addition of parameterName to ExecutionContextParameterName has helped consistency here. 🚀
rdiachenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Fixes: #101